//
//  DrawerViewController.m
//  LSDrawerExample
//
//  Created by Apple on 2018/3/28.
//  Copyright © 2018年 LuckyStrike. All rights reserved.
//

#import "DrawerViewController.h"
#import "UIViewController+LSDrawer.h"

@interface DrawerViewController ()<UITableViewDataSource,UITableViewDelegate>

@end

@implementation DrawerViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return 2;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell" forIndexPath:indexPath];
    cell.textLabel.text = indexPath.row ? @"Second" : @"First";
    return cell;
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    [self.ls_drawerController closeDrawerAnimated:YES completion:^(BOOL finished) {
        
        NSLog(@"%@",finished?@"抽屉已经关闭":@"抽屉关闭失败");
    }];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
